﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<script type="text/javascript">
    function auditPass()
   	 {
	   	$('#sign').val('pass');
	   	$('form').shiftform({
	   		parameters:$('#submitform').serialize()
	   	});
	 }
    
    function auditNoPass()
     {
    	$('#sign').val('nopass');
    	$('form').shiftform({
    		parameters:$('#submitform').serialize()
    	});
   	 }
</script>
 
<div class="modal-dialog demo2do-modal-dialog" style="width:1000px;">

  <div class="modal-content">
    
    <div class="modal-header beast-breadcrumb no-bottom-border clearfix">
            
      <h2>
        <i class="glyphicon glyphicon-fire" title=""></i>
        <span>用户审核&nbsp;-&nbsp;社交账户审核通过</span>
      </h2>
        
      <button type="button" class="close" data-dismiss="modal">&times;</button>
              
    </div>

    <form class="form-horizontal" id="submitform" method="post" action="${ctx.host}/customers/${customer.id}/social-account/${socialAccount.id}/audit">
    
      <input type="hidden" name="_method" value="PATCH" />
      <input type="hidden" name="sign" id="sign"/>
      <input type="hidden" name="socialAccountId" value="${socialAccount.id}" >
    
      <div class="modal-body">

        <div class="form-group demo2do-form-group">
          <label class="col-xs-2 control-label">账号</label>
          <div class="pull-left" style="width: 30%;">
            <p class="form-control-static">${socialAccount.name}</p>
          </div>
          <label class="col-xs-2 control-label">账号昵称</label>
          <div class="pull-left" style="width: 30%;">
            <p class="form-control-static">${socialAccount.nickName}</p>
          </div>
        </div>

        <c:choose>
		   <c:when test="${type == 'WECHAT'}">  
		         <div class="form-group demo2do-form-group">
				  <label class="col-xs-2 control-label">报价</label>
		          <div class="pull-left" style="width: 30%;">
		          	<%-- <p class="form-control-static"><fmt:formatNumber value="${socialAccount.estimatePrice/100}" pattern="#.##"/></p> --%>
		          	<!-- 报价先默认10元   -->
		            <p class="form-control-static">￥&nbsp;<fmt:formatNumber value="${variable.value }" pattern="#.##"/></p>
		          </div>
		        </div>
		   </c:when>
		   <c:otherwise> 
				<div class="form-group demo2do-form-group">
				  <label class="col-xs-2 control-label">报价</label>
		          <div class="pull-left" style="width: 30%;">
		          	<%-- <p class="form-control-static"><fmt:formatNumber value="${socialAccount.estimatePrice/100}" pattern="#.##"/></p> --%>
		          	<!-- 报价先默认10元   -->
		            <p class="form-control-static">￥&nbsp;<fmt:formatNumber value="${variable.value }" pattern="#.##"/></p>
		          </div>
		          <label class="col-xs-2 control-label">链接</label>
		          <div class="pull-left" style="width: 30%;">
		            <p class="form-control-static"><a href="${socialAccount.link}" target="_blank">${socialAccount.link}</a></p>
		          </div>
		        </div>
		   </c:otherwise>
		</c:choose>

        <div class="form-group demo2do-form-group">
          <label class="col-xs-2 control-label">账号状态</label>
          <div class="pull-left" style="width: 30%;">
            <p class="form-control-static"><label class="label label-${socialAccount.auditStatus.css}">${socialAccount.auditStatus.description}</label></p>
          </div>
        </div>

        <div class="form-group demo2do-form-group">    
          <label class="col-xs-2 control-label">粉丝数量</label>
          <div class="pull-left" style="width: 30%;">
            <input type="text" class="form-control" name="fans" value="${socialAccount.fans}" data-validate="required|number">
          </div>
          <label class="col-xs-2 control-label">上传认证图片时间</label>
          <div class="pull-left" style="width: 30%;">
            <p class="form-control-static"><fmt:formatDate value='${socialAccount.uploadTime}' pattern='yyyy-MM-dd HH:mm:ss' /></p>
          </div>
       </div>
       <div class="form-group demo2do-form-group">      
          <label class="col-xs-2 control-label">认证图片</label>
          <div style="padding-top:6px;"><a href="${ctx.qiniu}/${socialAccount.picture}" target="_blank">查看大图</a></div>
          <div class="col-xs-8  pull-left" style="width: 100%;text-align:center;">
            <img src="${ctx.qiniu}/${socialAccount.picture}" style="width:300px;"/>
          </div>
        </div>
      </div>

      <div class="modal-footer">
        <button type="btn-ajax" class="btn btn-success btn-shadow btn-shadow-success demo2do-btn" onclick="auditPass();">审核通过</button>&nbsp;&nbsp;&nbsp;&nbsp;
        <button type="btn-ajax" class="btn btn-success btn-shadow btn-shadow-success demo2do-btn" onclick="auditNoPass();">审核不通过</button>&nbsp;&nbsp;&nbsp;&nbsp;
        <button type="button" class="btn btn-default btn-shadow btn-shadow-default demo2do-btn" data-dismiss="modal">取消</button>
      </div>
  
    </form>
    
  </div>
</div>

